package br.com.faces;
/**  
 * @version 1.0.0 
 * @since 24/03/2014
 * @author Leonardo Augusto R. M. Aires 
 */
import java.io.Serializable;

import javax.faces.context.FacesContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import br.com.utilidades.CONSTANTES;
import br.com.utilidades.SessionDmClubBean;

@Component
@Scope("view")
public class TelaInicialBean implements Serializable{

	/**
	 * serial
	 */
	private static final long serialVersionUID = -7038327100008846448L;
	
	@Autowired
	private SessionDmClubBean sessionDmClubBean;
	
	private String login;
	private String senha;
	
	/**
	 * Construtor
	 * @param sessionDmClubBean
	 */
	@Autowired
    public TelaInicialBean(SessionDmClubBean sessionDmClubBean) {

		this.sessionDmClubBean = sessionDmClubBean;

		reset();
    }

    /**
     * reset
     */
    public void reset() {

    }
	
	
	/**
     * primeiro Acesso
     */
    public void primeiroAcesso() {
		
    	try {
		    FacesContext.getCurrentInstance().getExternalContext().redirect("/" +CONSTANTES.URLDMCLUB + "/cadastroDmClub.jsf");
		} catch (Exception ex) {
		    ex.printStackTrace();
		}
    	
    }

    //GET AND SET's

	public SessionDmClubBean getSessionDmClubBean() {
		return sessionDmClubBean;
	}


	public void setSessionDmClubBean(SessionDmClubBean sessionDmClubBean) {
		this.sessionDmClubBean = sessionDmClubBean;
	}


	public String getLogin() {
		return login;
	}


	public void setLogin(String login) {
		this.login = login;
	}


	public String getSenha() {
		return senha;
	}


	public void setSenha(String senha) {
		this.senha = senha;
	}


	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}
